//
// CPSInputType.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSInputType {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSInputType(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSInputType obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSInputType(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CPSInputType() {
    this(nel3dJNI.new_CPSInputType(), true);
  }

  public void setInputType(CPSInputType.TInputType value) {
    nel3dJNI.CPSInputType_InputType_set(swigCPtr, this, value.swigValue());
  }

  public CPSInputType.TInputType getInputType() {
    return CPSInputType.TInputType.swigToEnum(nel3dJNI.CPSInputType_InputType_get(swigCPtr, this));
  }

  public void serial(IStream f) {
    nel3dJNI.CPSInputType_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public final static class TInputType {
    public final static TInputType attrDate = new TInputType("attrDate", nel3dJNI.CPSInputType_attrDate_get());
    public final static TInputType attrPosition = new TInputType("attrPosition", nel3dJNI.CPSInputType_attrPosition_get());
    public final static TInputType attrInverseMass = new TInputType("attrInverseMass", nel3dJNI.CPSInputType_attrInverseMass_get());
    public final static TInputType attrSpeed = new TInputType("attrSpeed", nel3dJNI.CPSInputType_attrSpeed_get());
    public final static TInputType attrUniformRandom = new TInputType("attrUniformRandom", nel3dJNI.CPSInputType_attrUniformRandom_get());
    public final static TInputType attrUserParam = new TInputType("attrUserParam", nel3dJNI.CPSInputType_attrUserParam_get());
    public final static TInputType attrLOD = new TInputType("attrLOD", nel3dJNI.CPSInputType_attrLOD_get());
    public final static TInputType attrSquareLOD = new TInputType("attrSquareLOD", nel3dJNI.CPSInputType_attrSquareLOD_get());
    public final static TInputType attrClampedLOD = new TInputType("attrClampedLOD", nel3dJNI.CPSInputType_attrClampedLOD_get());
    public final static TInputType attrClampedSquareLOD = new TInputType("attrClampedSquareLOD", nel3dJNI.CPSInputType_attrClampedSquareLOD_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TInputType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TInputType.class + " with value " + swigValue);
    }

    private TInputType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TInputType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TInputType(String swigName, TInputType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TInputType[] swigValues = { attrDate, attrPosition, attrInverseMass, attrSpeed, attrUniformRandom, attrUserParam, attrLOD, attrSquareLOD, attrClampedLOD, attrClampedSquareLOD };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
